home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
tex
/
off_09.zip
/
WRITER.TXT
< prev
Wrap
Text File
|
1993-01-12
|
26KB
|
568 lines
-----------------------------------------------------------------------------
__ ___ ___
/ \ |__ |__
\__/ | |
An Informal Documentation Formatter
-----------------------------------------------------------------------------
WRITER'S GUIDE
Vassilis V. Dimakopoulos
--- Last Revision: January 1993 ---
QUICK OVERVIEW
OFF will do certain things for your documents, like
■ format your paragraphs
■ center lines
■ put attributes on the screen (e.g. bold, reverse, etc.)
■ create lists of things
Just write your document in any text editor without worrying for
the visual beauty of it. You only have to put some simple
keywords in some places that OFF will understand later to format
your document. When finished just run OFF on your file and watch
the result.
Consult the OFF Reader's Guide for OFF' s options.
STARTING
Your document consists of paragraphs and commands. The commands
affect the appearance of paragraphs. A paragraph is a set of
contiguous lines that ends with a blank line. This means that a
blank line starts a new paragraph. The job of OFF is basically
to format the paragraphs by adding/deleting spaces so that all
lines in a paragraph are both right and left indented by the
same amount. An example follows:
Document OFF output
As I was walking down As I was walking down the road
the road next next to my house I heard a
to voice:
my house I heard a voice:
"You started a new paragraph
"You started a new you stupid!"
paragraph you stupid!"
All the commands that OFF understands have the '%' character in
front of them, e.g. '%center', '%macro'. Then the command name
follows, without any space between the '%' and the command name.
A space before or after a command is optional.
If you want to actually print the character '%', precede it with
a backslash (\). If want to print the backslash, precede it with
another backslash (or else it will be ignored):
Document OFF output
Some characters: \%, \\, \\\% Some characters: %, \, \%
In most of the cases you won't need to use (m)any commands. For
example if you are writing a letter to somebody then probably
you just want OFF to format your paragraphs (instead of doing it
by hand!) and nothing else.
In case you want to do fancy things (e.g. center some lines)
then you probably need to know some of the commands OFF offers.
Tutorial sections for the commands follow and the complete list
is given for reference at the end of this document.
ATTRIBUTES
OFF has 4 commands to control the appearance of text when
displayed or printed:
%bold, %norm, %rev, %under.
%bold makes text appear in bold style; %rev makes text appear
reversed (black characters on white background or vice versa);
%under produces underlined text; %norm resets everything to
normal.
NOTE: When OFF output is sent directly to a printer ( -p command
line option,) then reversed characters actually appear as
italics.
Document OFF output
Different attributes: Different attributes:
%bold bold %rev reverse %under bold reverse underlined
underlined
LINE CONTROL COMMANDS
You can tell OFF to treat a line of text in a special way, using
the commands:
%center, %right, %trio, %verb.
%center will center a line; %right will flush a line towards the
right end of the screen; %trio will produce a line consisting of
3 parts: a flushed-left, a centered and a flushed-right part;
%verb will produce a line preserving all the spaces you typed
(i.e. verbatim line, unlike lines inside paragraphs.)
When OFF meets any of the above commands in your document, then
it will read the rest of the line and process it accordingly.
Document OFF output
Look at the following three lines, Look at the following three lines
that illustrate \%center, that illustrate %center, %right,
\%right, \%trio and \%verb. %trio and %verb.
%center Centered Centered
%right Flushed right Flushed right
%trio L %center C %right R L C R
%verb Lots of spaces ! Lots of spaces !
As you can see in the last example, a %trio line should be typed
as
%trio <left text> %center <center text> %right <right text>
to create the 3-part line. You can omit any of the 3 parts if
you wish. For example,
%trio <left text> %right <right text>
will produce a line with a left and a right part only.
Some things should be noted about the %verb command:
(a) it outputs spaces exactly as they appear in your document,
even if these spaces are preceded by a command. For example,
%verb a %bold b
will produce
--> a b
while,
%verb a%boldb
will produce
--> ab
So watch your spaces!
(b) keep in mind that the 1st space appearing after a %verb
command is always ignored.
(c) no indentation exists for verbatim lines, i.e. output begins
at column 0 always.
Inside a line that is to be formatted by the above commands, OFF
only understands the %bold, %endcol, %newpage, %norm, %rev,
%startcol, %under, %[ and %] commands. The last two commands do
not make any sense inside a %verb line, of course.
In the case you want to have many lines formatted by the above
commands, instead of typing the command name in the beginning of
each line, you can use the %begin command, as follows:
%begin <command_name>
...
... (lines to be processed)
...
%end
Do not forget the %end at the end!
Document OFF output
Here is a bunch of centered Here is a bunch of centered
lines, using the \%begin center lines, using the %begin
command: center command:
%begin center First line
First line Second line now
Second line now The last line
The last line
%end
You should keep in mind that whatever follows in the line of a
'%begin <c